﻿using DotNetStar.TheKing.Infrastructure;
using SDDP;
using System;
using System.Collections.Generic;

namespace DotNetStar.TheKing.Domain
{
    /// <summary>
    /// 表示消息通知的事件基类。
    /// </summary>
    public class NotificationBaseEvent:Event
    {
        /// <summary>
        /// 初始化 <see cref="NotificationBaseEvent"/> 类的新实例。
        /// </summary>
        /// <param name="user">接受通知的用户。</param>
        /// <param name="notification">发送的通知。</param>
        public NotificationBaseEvent(User user, NotificationBase notification)
        {
            this.User = user;
            this.Notification = notification;
        }

        /// <summary>
        /// 要通知的用户Id。
        /// </summary>
        public User User { get; }

        public NotificationBase Notification { get; }
    }

    /// <summary>
    /// 帖子回复通知事件。
    /// </summary>
    public class ContentReplyNotificationEvent : NotificationBaseEvent
    {
        /// <summary>
        /// 初始化 <see cref="ContentReplyNotificationEvent"/> 类的新实例。
        /// </summary>
        /// <param name="receiver">通知的用户。</param>
        /// <param name="content">回复的帖子。</param>
        /// <param name="notification">发送的通知。</param>
        public ContentReplyNotificationEvent(User receiver,Content content, NotificationBase notification) 
            : base(receiver, notification)
        {
            this.Content = content;
        }

        public Content Content { get; }
    }

}
